package info.niwota.webshot.image;

import java.io.InputStream;

import android.graphics.Bitmap;
import android.net.Uri;

public interface IImage {
    static final int THUMBNAIL_TARGET_SIZE = 320;
    static final int MINI_THUMB_TARGET_SIZE = 96;
    static final int THUMBNAIL_MAX_NUM_PIXELS = 512 * 384;
    static final int MINI_THUMB_MAX_NUM_PIXELS = 128 * 128;
    static final int UNCONSTRAINED = -1;

    public abstract Bitmap fullSizeBitmap(int minSideLength,
            int maxNumberOfPixels) throws Exception;
    public abstract Bitmap fullSizeBitmap(int minSideLength,
            int maxNumberOfPixels, boolean rotateAsNeeded, boolean useNative) throws Exception;
    public abstract int getDegreesRotated();
    public static final boolean ROTATE_AS_NEEDED = true;
    public static final boolean NO_ROTATE = false;
    public static final boolean USE_NATIVE = true;
    public static final boolean NO_NATIVE = false;

    public abstract InputStream fullSizeImageData();
    public abstract long fullSizeImageId();
    public abstract Uri fullSizeImageUri();

    public abstract String getDataPath();

    public abstract String getTitle();

    public abstract long getDateTaken();

    public abstract String getMimeType();

    public abstract int getWidth();

    public abstract int getHeight();

    public abstract String getDisplayName();

    public abstract Bitmap thumbBitmap(boolean rotateAsNeeded) throws Exception;

    public abstract Bitmap miniThumbBitmap() throws Exception;

    public abstract boolean rotateImageBy(int degrees);
}
